package com.dfbz.demo;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo04_数据流 {
    public static void main(String[] args) throws Exception{

        DataOutputStream dos = new DataOutputStream(new FileOutputStream("001.txt"));
        dos.writeInt(288);
        dos.close();

        DataInputStream dis = new DataInputStream(new FileInputStream("001.txt"));

        int number = dis.readInt();
        System.out.println(number);

        dis.close();

    }
}
